import React from "react";
import { BrowserRouter, Route, Switch } from "react-router-dom";
import { Provider } from "react-redux";
import Store from "./store/store";
import Home from "./view/home/home";
import Login from "./view/login/login";
import RouterConfig from "./RouterConfig/RouterConfig";

import "./App.css";

function App() {
  return (
    <Provider store={Store}>
      <BrowserRouter>
        {/* 路由拦截器 */}
        <Route component={RouterConfig} />
        <Switch>
          <Route path="/login" component={Login} />
          <Route path="/" component={Home} />
        </Switch>
      </BrowserRouter>
    </Provider>
  );
}

export default App;
